package com.xiguaji.tiktok.v1.tiktok.blogger.dto;

import com.xiguaji.tiktok.v1.tiktok.blogger.model.BloggerRecord;
import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Data
public class BloggerPerformanceResponse {
    private long bloggerId;
    private Long awemeCount;
    private Long followerCount;
    private Long followerGrowth;
    private Long likeCount;
    private Long likeGrowth;
    private Long viewCount;
    private Long viewGrowth;
    private Long reviewCount;
    private Long reviewGrowth;
    private Long shareCount;
    private Long shareGrowth;
    private Integer datecode;

    @Mapper(componentModel = "spring")
    public interface BloggerMapper {


        @Mapping(source = "likeTotalCount", target = "likeCount")
        @Mapping(source = "likeTotalCountGrowth", target = "likeGrowth")
        BloggerPerformanceResponse mapper(BloggerRecord bloggerRecord);

        List<BloggerPerformanceResponse> mapper(List<BloggerRecord> bloggerRecord);
    }
}
